package com.bnz.service.impl;

import com.bnz.entity.Classes;
import com.bnz.mapper.ClassesMapper;
import com.bnz.service.ClassesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service // 注入spring容器
public class ClassesServiceImpl implements ClassesService {
    // 引入classesMapper
    @Autowired
    private ClassesMapper classesMapper;

    // 1、查询classes表里的全部数据
    @Override
    public List<Classes> findAll() {
        List<Classes> classes = classesMapper.selectAll();
        return classes;
    }
}
